package com.yilin.platform.entity.user.deserialize;

import javax.persistence.Column;

public class HatchWechat {
    private String notifyBackUrl; // 微信回调服务器地址

    //---------------貨主端---------------------------
    private String shipperMchId; //商户号
    private String shipperAppId; //Appid
    private String shipperUniversalLink;//IOS跳转链接

    private String shipperCertFolderUrl; //微信SSL证书路径
    private String shipperPrivateKeyUrl; //商户私钥路径
    private String shipperSerialNo;  //证书序列号
    private String shipperApiV3Key;//apiV3秘钥


    //-----------------司機端-------------------------
    private String truckerMchId;//商户号
    private String truckerAppId;//Appid
    private String truckerUniversalLink;//IOS跳转链接
    private String truckerCertFolderUrl;//微信SSL证书路径
    private String truckerPrivateKeyUrl;//商户私钥路径
    private String truckerSerialNo; //证书序列号
    private String truckerApiV3Key; //apiV3秘钥

    public String getNotifyBackUrl() {
        return notifyBackUrl;
    }
    public String getMchId(String userType) {
        if ("shipperUser".equals(userType)) {
            return this.shipperMchId;
        } else if ("truckerUser".equals(userType)) {
            return this.truckerMchId;
        } else {
            return null;
        }
    }

    public String getAppId(String userType) {
        if ("shipperUser".equals(userType)) {
            return this.shipperAppId;
        } else if ("truckerUser".equals(userType)) {
            return this.truckerAppId;
        } else {
            return null;
        }
    }

    public String getUniversalLink(String userType) {
        if ("shipperUser".equals(userType)) {
            return this.shipperUniversalLink;
        } else if ("truckerUser".equals(userType)) {
            return this.truckerUniversalLink;
        } else {
            return null;
        }
    }

    public String getCertFolderUrl(String userType) {
        if ("shipperUser".equals(userType)) {
            return this.shipperCertFolderUrl;
        } else if ("truckerUser".equals(userType)) {
            return this.truckerCertFolderUrl;
        } else {
            return null;
        }
    }

    public String getPrivateKeyUrl(String userType) {
        if ("shipperUser".equals(userType)) {
            return this.shipperPrivateKeyUrl;
        } else if ("truckerUser".equals(userType)) {
            return this.truckerPrivateKeyUrl;
        } else {
            return null;
        }
    }

    public String getSerialNo(String userType) {
        if ("shipperUser".equals(userType)) {
            return this.shipperSerialNo;
        } else if ("truckerUser".equals(userType)) {
            return this.truckerSerialNo;
        } else {
            return null;
        }
    }

    public String getApiV3Key(String userType) {
        if ("shipperUser".equals(userType)) {
            return this.shipperApiV3Key;
        } else if ("truckerUser".equals(userType)) {
            return this.truckerApiV3Key;
        } else {
            return null;
        }
    }
}
